<template>
  <div class="choose">
    <header>
      <div class="logo"><img src="../../assets/img/class/Headerkefu.png" alt=""></div>
      <div class="search"><input type="text" placeholder="输入关键字搜索作品"></div>
    </header>
    <ul class="class">
      <li>分类</li>
      <li 
        v-for="v in class_list" 
        @click="choose"
      >{{v}}</li>
    </ul>
    <ul class="theme">
      <li>题材</li>
      <li v-for="v in theme_list" @click="choose">{{v}}</li> 
    </ul>
    <ul class="price">
      <li>价格区间</li>
      <li v-for="v in price_list" @click="choose">{{v}}</li>
    </ul>
  </div>
</template>
<script>
export default{
  name: '',
  data () {
    return {
      class_list: ['油画','版画','水墨','水彩(粉)','雕塑','摄影','书法','其他'],
      theme_list: ['风景','人物','静物','动物','花鸟','山水','其他'],
      price_list: ['￥2,000以下','￥2,000-￥8,000','￥8,000-￥15,000']
    }
  },
  methods: {
    choose (e) {
      if(e.path[0].style.color == ''){
        e.path[0].style.color = 'rgb(255, 255, 255)'
        e.path[0].style.backgroundColor = 'rgb(0, 0, 0)'
      }else{
        e.path[0].style.color = ''
        e.path[0].style.backgroundColor = ''
      }
    }
  }
}
</script>
<style scoped lang="less">
  .choose{
    // height: 240px;
    // border: 1px solid red;
    header{
      height: 50px;
      .logo{
        width: 30px;
        height: 30px;
        margin: 10px;
        float: left;
        img{
          width: 100%;
        }
      }
      .search{
        margin: 10px 0;
        height: 30px;
        float: left;
        background-image: url(../../assets/img/class/ss.png);
        background-repeat: no-repeat;
        background-position: left center;
        background-size: 24px;
        padding-left: 30px;
        input{
          height: 26px;
          outline: none;
          border: none;
        }
      }
    }
    .class,.theme,.price{
      // border: 1px solid red;
      display: flex;
      margin: 6px 0 16px;
      li{
        padding: 0 6px;
        margin: 0 2px;
        height: 24px;
        text-align: center;
        line-height: 24px;
        color: #666;
        font-size: 0.8em;
      }
      li:first-child{
        border-right: 1px solid #bbb;
        color: #000;
      }
    }
  }
</style>